package srgarcom;

/**
 * Created by Rafael on 14/10/13.
 */

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class sgMainMenu  extends Activity {
    Button btnMkOrder;
    Button btnCkPartial;
    Button btnTableInput;
    Button btnMkBill;
    TextView partialValue;

    public void onCreate(Bundle savedInstanceState) {

        this.onCreate(savedInstanceState);
        setContentView(R.layout.sgmainmenu);

        btnMkOrder = (Button) findViewById(R.id.btnMkOrder);
        btnCkPartial = (Button) findViewById(R.id.btnCkPartial);
        btnTableInput = (Button) findViewById(R.id.btnTableInput);
        btnMkBill = (Button) findViewById(R.id.btnMkBill);
        partialValue = (TextView) findViewById(R.id.partialValue);

        //Button response to Make Order
        btnMkOrder.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {

                Intent i = new Intent(getApplicationContext(), sgMenu.class);
                startActivity(i);
                finish();

            }
        });
        //Button response to check partial view
        btnCkPartial.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                partialValue.setText("O valor parcial da conta é de x.");

                    }
        });
        //Button response to table input
        btnTableInput.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent i = new Intent(getApplicationContext(), sgMenu.class);
                startActivity(i);
                finish();
                }
        });
        //Button response to Make Bill
        btnMkBill.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent i = new Intent(getApplicationContext(), sgMenu.class);
                startActivity(i);
                finish();
                    }
            });
    }
}
